<template src="./template.html"></template>

<style src="./style.css" scoped></style>

<script>
    import shareBg from './assets/images/share-bg.png';
    import shareTipImg from './assets/images/share-tip.png';
    import squareImg from './assets/images/square.png';
    import api from 'api/api';
    import modal from 'utils/modal';
    import jsbridge from 'utils/jsbridge';

    export default{
        data(){
            return{
                shareBg: shareBg,
                shareTipImg: shareTipImg,
                squareImg: squareImg,
                userCode: '',
                stepList: [],
                listLoaded: false
            }
        },
        created(){
            api.sendHttp("getMyCodeApi",{}).then(res=>{
                let _code = res.data && res.data.myShareCode;
                if(_code){
                    this.userCode = _code;
                }
                this.stepList = res.data.contents || [];
                this.listLoaded = true;
            },res=>{
                modal.toast(res.msg);
            })
        }
    }
</script>
